package main

import "fmt"

//演示类型断言的使用2
func main() {
	TypeJudge(int32(1), "", Student{}, &Student{})
}

func TypeJudge(items ...interface{}) {
	for index, val := range items {
		switch val.(type) {
		case int32:
			fmt.Printf("第%v个参数 是int32类型", index)
		case int:
			fmt.Printf("第%v个参数 是int类型", index)
		case bool:
			fmt.Printf("第%v个参数 是bool类型", index)
		case string:
			fmt.Printf("第%v个参数，是string类型", index)
		case Student:
			fmt.Printf("第%v个参数，是Student类型", index)
		case *Student:
			fmt.Printf("第%v个参数，是Student指针类型", index)
		}
	}
}

type Student struct {
}
